package models.mapper;

import java.util.List;

import models.DrLiveTemp;
import models.DrLiveTempExample;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface DrLiveTempMapper {
    int countByExample(DrLiveTempExample example);

    int deleteByExample(DrLiveTempExample example);

    int deleteByPrimaryKey(String tempid);

    int insert(DrLiveTemp record);

    int insertSelective(DrLiveTemp record);

    List<DrLiveTemp> selectByExample(DrLiveTempExample example);

    DrLiveTemp selectByPrimaryKey(String tempid);

    int updateByExampleSelective(@Param("record") DrLiveTemp record, @Param("example") DrLiveTempExample example);

    int updateByExample(@Param("record") DrLiveTemp record, @Param("example") DrLiveTempExample example);

    int updateByPrimaryKeySelective(DrLiveTemp record);

    int updateByPrimaryKey(DrLiveTemp record);
    @Select("select * from(select * from DR_LIVE_TEMP where CASEID=#{caseid} order by BEGIN_TIME desc) where rownum<2")
    DrLiveTemp getLastOne(String caseid);
}